home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / Testing & Debugging / Hardware tools / HW Bring-up Tools / HW Bring-up README text next >
Encoding:
Text File  |  1993-09-17  |  3.4 KB  |  109 lines  |  [TEXT/MSWD]

  1.  
  2. Hardware Bring-up Tools    1
  3.  
  4.  
  5. Hardware Bring-up Tools
  6.  
  7.  
  8. This is a set of three MPW tools that I wrote for hardware debug and bring-up.  You could probably write them yourself in an hour or so – but what if you don’t have that much time...
  9.  
  10.  
  11. RW - read or write a long
  12.  
  13. Usage: 
  14. RW address    Reads a long from the specified address.
  15. RW address [value]    Writes the value as a long to the specified address.
  16.  
  17.  
  18. RW8 - read or write a byte
  19.  
  20. Usage: 
  21. RW8 address    Reads a byte from the specified address.
  22. RW8 address [value]    Writes the value as a byte to the specified address.
  23.  
  24.  
  25. IncrPattern - pattern test an address range
  26.  
  27. Usage:
  28. IncrPattern baseAddr size initialPattern increment
  29.  
  30. baseAddress specifies the beginning address to test.
  31. size specifies the number of bytes to test (as longs though).
  32. initialPattern specifies a seed pattern.  This is the initial value of the incrementing pattern.
  33. increment is the value added to the incrementing pattern following each read or write.
  34.  
  35. The algorithm:  The address range specified from baseAddr to baseAddr+size is treated as an array of 4-byte longwords.  The array is tested in two passes: the first pass fills the array with a known data pattern and the second pass verifies the pattern. 
  36.  
  37. Starting at the location specified by baseAddr, the array is filled with a pattern with a starting value of initialPattern and increments by increment for each successive location.  For example, if initialPattern is 1234 and increment is 1122, then the fill pattern will be:
  38.  
  39. location    pattern
  40. baseAddr    1234
  41. baseAddr+4    2356
  42. baseAddr+8    3478
  43. baseAddr+12    4600
  44. etc...
  45.  
  46. Once the array is filled with the incrementing pattern, the second pass reads and verifies the contents of the array.  This, again, starts at the location specified by baseAddr.  The test terminates on the first location that does not contain the value that was written to it.
  47.  
  48. I often use the incrementing pattern algorithm to implement a more specialized algorithm that I call an address pattern.  If the value of initialPattern is the same as that of baseAddr and the value of increment is 4, the following pattern is generated:
  49.  
  50. location    pattern
  51. baseAddr    baseAddr
  52. baseAddr+4    baseAddr
  53. baseAddr+8    baseAddr
  54. baseAddr+12    baseAddr
  55. etc...
  56.  
  57. The nice thing about the address pattern algorithm is that stuck data bits and address aliases are easy to “see” by visually inspecting the contents of the address range following a failure.  For example:
  58.  
  59. location    pattern
  60. $10000000    $10020000
  61. $10000004    $10020004
  62. $10000008    $10020008
  63. $1000000c    $1002000c
  64. ...
  65. $10001230    $10021230
  66. $10001234    $10021234
  67. $10001238    $10021238
  68. $1000123c    $1002123c
  69. ...
  70. $10020000    $10020000
  71. $10020004    $10020004
  72. $10020008    $10020008
  73. $1002000c    $1002000c
  74. etc...
  75.  
  76. This is likely data bit-17 stuck high or address bit-17 stuck either high or low.
  77.  
  78.  
  79. Examples
  80.  
  81. Set baseAddr 0xfe000000
  82.  
  83. RW8 {baseAddr}            # Reads a byte at {baseAddr}.
  84. RW {baseAddr} 0xffffffff    # Writes $ffffffff to {baseAddr}.
  85. RW {baseAddr} 123            # Writes 123 to {baseAddr}.
  86. RW {baseAddr} 0b100100011    # Writes 123 to {baseAddr}.
  87.  
  88.  
  89. # Scope loop.
  90. Loop
  91.     RW {baseAddr}
  92. End
  93.  
  94. Set ramBase 0xfe080000
  95. Set ramSize `Evaluate (512 * 1024)`
  96.  
  97. # Address pattern test.
  98. IncrPattern {ramBase} {ramSize} {ramBase} 4
  99.  
  100.  
  101. Now what...
  102.  
  103. Of course there’s a lot more these tools could do – either by scripting or by modifying the tools themselves.  You’ve got the source, help yourself.  I’d really appreciate it if you’d send any really useful additions back my way.  
  104.  
  105. Mark Appleman
  106. Appleman.M@applelink.apple.com
  107.  
  108.  
  109.